/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.creational.singleton;

/**
 *
 * @author Malotana
 */
public class Singleton {
    private static Singleton singleton = null;
    
    private Singleton(){
    }
    
    public synchronized static Singleton getInstance(String type){
        if(singleton == null){
            return new Singleton();
        }
        else
            return singleton;
    }
    
    public void sayHello(){
        System.out.println("Hello!");
    }
    
}
